package main

import (
	"image"
	"image/color"
	"sync"
)

type ColoredPoint struct {
	//image.Point
	//使用指针，可以共用对象
	*image.Point
	Color color.RGBA
}

var cache = struct {
	sync.Mutex
	mapping map[string]string
}{
	mapping: make(map[string]string),
}

func lookup(key string) string {
	cache.Lock()
	v := cache.mapping[key]
	cache.Unlock()
	return v
}

//var (
//	mu sync.Mutex
//	mapping = make(map[string]string)
//)
//func Lookup(key string) string {
//	mu.Lock()
//	v:= mapping[key]
//	mu.Unlock()
//	return v
//}
